######################################################################
# Generic C++ Project Makefile v2.1
# Copyright (c) 1998-2001 Vokimon/KKEPerian UNLTD
# Copyright (c) 1998-2001 Helly/Patata Productions
######################################################################

# Change the following options as suited to your project

# The name of the executable file
EXEC=./testApp

# Library flags for the linker
LDLIBS=-lThread -llagniappe
# Flags for the C compiler
CFLAGS=-Wall -O3 -I. -I/usr/local/include -g
LDFLAGS= 

# Change the following options as suited to your system

# The C compiler
CC=gcc
# The C++ compiler
CPPC=g++
# Command used to delete files
RM=rm -rf

CPPSOURCES:= $(wildcard *.cc)
OBJSCPP:=$(CPPSOURCES:.cc=.o)

default: depend ${EXEC}

depend: .depend
	@echo --- Generating dependencies
	$(CPPC) $(CFLAGS) -MM $(CPPSOURCES) -D_KKEP_BUSCANT_DEPENDENCIES > .depend

.depend:
	touch .depend

clean: 
	-$(RM) `find -name '*.o'`
	-$(RM) ${EXEC}

include .depend

${EXEC}: $(OBJSCPP) 
	@echo --- Linking $@
	${CPPC} $(LDFLAGS) $(OBJSCPP) ${LDLIBS} -o ${EXEC}

$(OBJSCPP) : %.o: %.cc
	@echo --- Compiling $<
	${CPPC} ${CFLAGS} -c $< -o $@



